<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Macros</title>
</head><body>#define SIZEOF_ARRAY(array) (sizeof((array))/sizeof((array)[0]))<br/>
#define SETFLAG(x, y) ((x) = ((x) | (y)))<br/>
#define CLRFLAG(x, y) ((x) = ((x) &amp; (y)))<br/>
#define TESTFLAG(x, y) ((x) &amp; (y))<br/>
#define CHARTOINT(a, b, c, d) ((((a) &amp; 0xFF) &lt;&lt; 24) | (((a) &amp; 0xFF) &lt;&lt; 16) | (((c) &amp; 0xFF) &lt;&lt; 8) | (((d) &amp; 0xFF)))<br/>
</body></html>